package com.base.pig.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 报警参数设置
 * </p>
 *
 * @author wzx
 * @since 2022-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="AlarmSetting对象", description="报警参数设置")
public class AlarmSetting implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键-添加时不用上传")
    @TableId(value = "ALARM_ID", type = IdType.AUTO)
    private BigDecimal alarmId;

    @ApiModelProperty(value = "报警上限-double，小数后最多后三位")
    @TableField("UPPER_LIMIT")
    private BigDecimal upperLimit;

    @ApiModelProperty(value = "报警下限-double，小数后最多后三位")
    @TableField("LOWER_LIMIT")
    private BigDecimal lowerLimit;

    @ApiModelProperty(value = "预警上限-double，小数后最多后三位")
    @TableField("UPPER_EW")
    private BigDecimal upperEw;

    @ApiModelProperty(value = "预警下限-double，小数后最多后三位")
    @TableField("LOWER_EW")
    private BigDecimal lowerEw;

    @ApiModelProperty(value = "标准值-double，小数后最多后三位")
    @TableField("THRESHOLD")
    private BigDecimal threshold;

    @ApiModelProperty(value = "是否停用 1为停用-添加时不用上传")
    @TableField("DELETED")
    private String deleted;

    @ApiModelProperty(value = "数据上传周期（分钟）")
    @TableField("UPLOAD_CYCLE")
    private BigDecimal uploadCycle;

    @ApiModelProperty(value = "名称")
    @TableField("NAME")
    private String name;

    @ApiModelProperty(value = "时间-添加时不用上传")
    @TableField("TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;


}
